#pragma once

#include <list>

class cCollision
{
	struct sRECT 
	{
		int* state;
		int* PosX,* PosY;
		int sizeX, sizeY;
	};

	std::list<sRECT> mLcollisionList;
	std::list<sRECT>::iterator mLcollisionListIt;

	std::list<sRECT> mRcollisionList;
	std::list<sRECT>::iterator mRcollisionListIt;

public:
	cCollision(void);
	~cCollision(void);

	void LADD( int* state,  int* X,  int* Y, int pSizeX, int pSizeY);
	void RADD( int* state,  int* X,  int* Y, int pSizeX, int pSizeY);

	void Collision();
	bool Collision( int pL,  int pLsize,  int pR,  int pRsize);
};